/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.market.entity;

import org.hibernate.validator.constraints.Length;

import com.kaaction.common.persistence.DataEntity;
import com.kaaction.modules.operate.entity.Client;

/**
 * 作品Entity
 * @author zengbiao
 * @version 2017-04-21
 */
public class Works extends DataEntity<Works> {
	
	private static final long serialVersionUID = 1L;
	private Client client;		// client_id
	private String sourceType;		// source_type
	private Event event;		// source_event_id
	private String works;		// works
	private String status;		// status
	private String ownBy;		// 作品所属学校或个人
	private String title;		// 作品名称
	private String content;		// 作品详述
	
	public Works() {
		super();
	}

	public Works(String id){
		super(id);
	}
	
	@Length(min=1, max=64, message="source_type长度必须介于 1 和 64 之间")
	public String getSourceType() {
		return sourceType;
	}

	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}
	
	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public Event getEvent() {
		return event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}

	@Length(min=1, max=500, message="works长度必须介于 1 和 500 之间")
	public String getWorks() {
		return works;
	}

	public void setWorks(String works) {
		this.works = works;
	}
	
	@Length(min=0, max=3, message="status长度必须介于 0 和 3 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=1, max=45, message="作品所属学校或个人长度必须介于 1 和 45 之间")
	public String getOwnBy() {
		return ownBy;
	}

	public void setOwnBy(String ownBy) {
		this.ownBy = ownBy;
	}
	
	@Length(min=1, max=200, message="作品名称长度必须介于 1 和 200 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
}